<?php
class M_log extends Module {
  public function main() {
    $pn = 1;
    if ( strpos(Site::url(2),'page')===0 ) {
      $pn = substr( Site::url(2), 4 )+0;
      if ( $pn < 1 ) $pn = 1;
    }
    
    $pp = 10;
    var_dump($pn);

    $list = new Pub_List();
    $list->page = $pn;
    $list->num = $pp;
    $list->sql = "SELECT * FROM `posts` WHERE 1 ORDER BY `date` DESC";
    $list->load();
    $list->template = 'log';
    return $list->get_html();
  }
}
?>